home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The 640 MEG Shareware Studio 2
/
The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO
/
sb
/
colr_mpl.zip
/
RSB4COLR.MOD
< prev
Wrap
Text File
|
1992-06-14
|
16KB
|
326 lines
58250 ' $SUBTITLE: 'SmartText - smart text substitution'
' $PAGE
'
' NAME -- SmartText (WRITTEN BY DOUG AZZARITO)
'
' INPUTS -- StringWork$ string to scan for Smart Text
' CRFound Does this line contain a CR?
' ZSmartTextCode Smart Text control code
'
' OUTPUTS -- StringWork$ Input string with Smart replaced
'
' PURPOSE -- Smart Text allows control strings in text files
' to be replaced at runtime with user info or other
' data. The Smart Text control code is a 1-byte
' code (configurable) with a 2-byte action code.
'
SUB SmartText (StringWork$, CRFound, OverStrike) STATIC
IF SmartCarry$<>"" THEN _
StringWork$ = SmartCarry$+StringWork$
Index = INSTR(StringWork$, ZSmartTextCode$)
WHILE Index > 0 AND Index < LEN(StringWork$)-1
IF INSTR(MID$(StringWork$, Index+1,2)," ") THEN _
SmartAct = 0 _
ELSE _
SmartAct = INSTR(ZSmartTable$, MID$(StringWork$, Index+1, 2))
IF SmartAct = 0 THEN _
WasI = 1 : _
GOTO 58254
SmartAct = (SmartAct+2)/3
ON SmartAct GOSUB 58260, 58261, 58262, 58263, 58264, 58265, _
58266, 58267, 58268, 58269, 58270, _
58271, 58272, 58273, 58274, 58275, _
58276, 58277, 58296, 58296, 58296, _ ' DD061303/COLR
58296, 58296, 58296, 58296, 58296, _ ' DD061303/COLR
58296, 58296, 58296,_ ' DD061303/COLR
58278, 58279, 58280, _ ' DD061303/COLR
58281, 58282, 58283, 58284, 58285, _
58286, 58287, 58289, 58290, 58291, _
58292, 58293, 58294, 58295
GOSUB 58256
WasI = LEN(SmartHold$)
ReplaceLen = 3
IF OverStrike OR Overlay THEN _
IF WasI > 2 THEN _
ReplaceLen = WasI _
ELSE _
SmartHold$ = SmartHold$ + SPACE$(3 - WasI)
StringWork$ = LEFT$(StringWork$, Index-1) + SmartHold$ + _
MID$(StringWork$,Index+ReplaceLen)
58254 Index = INSTR(Index+WasI, StringWork$, ZSmartTextCode$)
WEND
IF Index AND (Index > LEN(StringWork$)-2) AND NOT CRFound THEN _
SmartCarry$ = MID$(StringWork$,Index) : _
StringWork$ = LEFT$(StringWork$,Index-1) : _
ELSE _
SmartCarry$ = ""
EXIT SUB
58256 IF TrimSmart THEN _
CALL Trim (SmartHold$)
RETURN
58258 ZLastSmartColor$ = SmartHold$
RETURN
58260 ZLinesPrinted = 0 ' CS (Clear screen line count reset)
SmartHold$ = ""
RETURN
58261 ZLinesPrinted = ZPageLength ' PB Page Break
IF ZNonStop THEN _ ' force a 1-time pause
ZOneStop = ZTrue : _ ' if NON STOP is on
ZNonStop = ZFalse
SmartHold$ = ""
ZForceKeyboard = ZTrue
RETURN
58262 ZNonStop = ZTrue ' NS Non-stop
SmartHold$ = ""
RETURN
58263 IF ZGlobalSysop THEN _ ' FN First Name
SmartHold$ = ZOrigSysopFN$ _
ELSE SmartHold$ = ZFirstName$
CALL NameCaps(SmartHold$)
RETURN
58264 IF ZGlobalSysop THEN _
SmartHold$ = ZOrigSysopLN$ _
ELSE SmartHold$ = ZLastName$
CALL NameCaps(SmartHold$)
RETURN
58265 SmartHold$ = STR$(ZUserSecLevel) ' SL Security level ' KG052201
CALL Trim (SmartHold$) ' KG052201
RETURN
58266 SmartHold$ = DATE$ ' DT Date
RETURN
58267 CALL AMorPM
SmartHold$ = ZTime$ ' TM Time
RETURN
58268 CALL TimeRemain(MinsRemaining)
SmartHold$ = MID$(STR$(INT(MinsRemaining)),2)
RETURN
58269 CALL TimeRemain(MinsRemaining) ' TE Time elapsed (mm:ss)
SmartHold$ = MID$(STR$(INT(ZSecsUsedSession!/60)),2)+":"+ _
MID$(STR$((ZSecsUsedSession! MOD 60)+100),3)
RETURN
58270 SmartHold$ = MID$(STR$(INT((ZTimeLockSet+0.5)/60)),2) ' TL - Time Lock period
SmartHold$ = SmartHold$ + ":"+ MID$(STR$((ZTimeLockSet MOD 60)+100),3)
RETURN
58271 SmartHold$ = MID$(STR$(ZDaysInRegPeriod),2)
RETURN ' RP Registration Length
58272 SmartHold$ = MID$(STR$(ZRegDaysRemaining),2)
RETURN ' RR Registration Remaining
58273 SmartHold$ = ZCityState$ ' CT Users CITY & STATE
CALL Trim (SmartHold$) ' DD032301
RETURN
58274 SmartHold$ = ZFG1$ ' C1 Color 1
GOTO 58258
58275 SmartHold$ = ZFG2$ ' C2 Color 2
GOTO 58258
58276 SmartHold$ = ZFG3$ ' C3 Color 3
GOTO 58258
58277 SmartHold$ = ZFG4$ ' C4 Color 4
GOTO 58258
58278 SmartHold$ = ZEmphasizeOff$ ' C0 Reset color
ZLastSmartColor$ = ""
RETURN
58279 SmartHold$ = MID$(STR$(INT(ZDLToday!)),2)
RETURN ' DD files Dnlded TODAY
58280 SmartHold$ = MID$(STR$(INT(ZBytesToday!)),2)
RETURN ' BD Bytes Dnlded TODAY
58281 SmartHold$ = MID$(STR$(INT(ZDLBytes!)),2)
RETURN ' DB Download Bytes
58282 SmartHold$ = MID$(STR$(INT(ZULBytes!)),2)
RETURN ' UB Upload Bytes
58283 SmartHold$ = MID$(STR$(ZDnlds),2) ' DL Number of Dnlds
RETURN
58284 SmartHold$ = MID$(STR$(ZUplds),2) ' UL Number of Uplds
RETURN
58285 SmartHold$ = ZFileName$ ' FI File Name
RETURN
58286 Overlay = ZTrue ' VY Overlay ON
GOTO 58288
58287 Overlay = ZFalse ' VN Overlay OFF
58288 SmartHold$ = ""
RETURN
58289 TrimSmart = ZTrue ' TY Trim Yes
GOTO 58288
58290 TrimSmart = ZFalse ' TN Trim No
GOTO 58288
58291 SmartHold$ = ZRBBSName$ ' BN Board Name
RETURN
58292 SmartHold$ = ZNodeID$ ' ND Node Number
IF SmartHold$ >= "A" THEN _
SmartHold$ = MID$(STR$(ASC(SmartHold$) - 54),2)
RETURN
58293 SmartHold$ = ZSysopFirstName$ ' FS Sysops First Name
CALL NameCaps(SmartHold$)
RETURN
58294 SmartHold$ = ZSysopLastName$ ' LS Sysops First Name
CALL NameCaps(SmartHold$)
RETURN
58295 SmartHold$ = ZConfName$ ' CN Conference Name ' TC070704
RETURN
58296 IF SmartAct = 19 THEN SmartHold$ = ZFG5$
IF SmartAct = 20 THEN SmartHold$ = ZFG6$ ' DD061303/COLR
IF SmartAct = 21 THEN SmartHold$ = ZFG7$ ' DD061303/COLR
IF SmartAct = 22 THEN SmartHold$ = ZFG8$ ' DD061303/COLR
IF SmartAct = 23 THEN SmartHold$ = ZFG9$ ' DD061303/COLR
IF SmartAct = 24 THEN SmartHold$ = ZFGA$ ' DD061303/COLR
IF SmartAct = 25 THEN SmartHold$ = ZFGB$ ' DD061303/COLR
IF SmartAct = 26 THEN SmartHold$ = ZFGC$ ' DD061303/COLR
IF SmartAct = 27 THEN SmartHold$ = ZFGD$ ' DD061303/COLR
IF SmartAct = 28 THEN SmartHold$ = ZFGE$ ' DD061303/COLR
IF SmartAct = 29 THEN SmartHold$ = ZFGF$ ' DD061303/COLR
GOTO 58258 ' DD061303/COLR
END SUB ' DD061303/COLR
'
59934 ' $SUBTITLE: 'SetHiLite - subroutine to reset highlight preference'
' $PAGE
'
' NAME -- SetHiLite
'
' INPUTS -- PARAMETER MEANING
' SetTo New value (True or False)
' ZEmphasizeOnDef$ String turns emphasize on
' ZEmphasizeOffDef$ String turns emphasize off
'
' OUTPUTS -- ZHiLiteOff Callers preference on Hilite
' ZEmphasizeOn$ String to use for emphasis
' ZEmphasizeOff$ String to use after emphasis
'
SUB SetHiLite (SetTo) STATIC
ZHiLiteOff = (ZEmphasizeOnDef$ <> "" AND SetTo)
IF ZHiLiteOff THEN _
ZEmphasizeOn$ = "" : _
ZEmphasizeOff$ = "" : _
ZFG1$ = "" : _
ZFG2$ = "" : _
ZFG3$ = "" : _
ZFG4$ = "" : _ ' DD061303/COLR
ZFG5$ = "" : _ ' DD061303/COLR
ZFG6$ = "" : _ ' DD061303/COLR
ZFG7$ = "" : _ ' DD061303/COLR
ZFG8$ = "" : _ ' DD061303/COLR
ZFG9$ = "" : _ ' DD061303/COLR
ZFGA$ = "" : _ ' DD061303/COLR
ZFGB$ = "" : _ ' DD061303/COLR
ZFGC$ = "" : _ ' DD061303/COLR
ZFGD$ = "" : _ ' DD061303/COLR
ZFGE$ = "" _ ' DD061303/COLR
ELSE ZEmphasizeOn$ = ZEmphasizeOnDef$ : _
ZFG1$ = ZFG1Def$ : _
ZFG2$ = ZFG2Def$ : _
ZFG3$ = ZFG3Def$ : _
ZFG4$ = ZFG4Def$ : _ ' DD061303/COLR
ZFG5$ = ZEscape$ + "[1;34;40m" : _ 'Brt Blue ' DD061303/COLR
ZFG6$ = ZEscape$ + "[1;35;40m" : _ 'Brt Magenta ' DD061303/COLR
ZFG7$ = ZEscape$ + "[1;33;44m" : _ 'Yellow/Blue ' DD061303/COLR
ZFG8$ = ZEscape$ + "[1;33;42m" : _ 'Yellow/Green ' DD061303/COLR
ZFG9$ = ZEscape$ + "[1;33;41m" : _ 'Yellow/Red ' DD061303/COLR
ZFGA$ = ZEscape$ + "[1;33;45m" : _ 'Yellow/Magenta ' DD061303/COLR
ZFGB$ = ZEscape$ + "[1;37;44m" : _ 'White/Blue ' DD061303/COLR
ZFGC$ = ZEscape$ + "[1;37;42m" : _ 'White/Green ' DD061303/COLR
ZFGD$ = ZEscape$ + "[1;37;41m" : _ 'White/Red ' DD061303/COLR
ZFGE$ = ZEscape$ + "[1;37;45m" : _ 'White/Magenta ' DD061303/COLR
ZFGF$ = ZEscape$ + "[1;36;44m" 'Brt Cyan/Blue ' DD061303/COLR
END SUB
59965 ' $SUBTITLE: 'UserColor - lets user set color for normal text'
' $PAGE
'
' NAME -- UserColor
'
' INPUTS -- PARAMETER MEANING
' ZEmphasizeOff$ Normal text color
'
' OUTPUTS -- ZEmphasizeOff$ New text color
' ZBoldText$ Whether bold (0 not, 1 bold)
' ZUserTextColor ANSI Color selected
'
' PURPOSE -- Lets caller select desired color and whether bold.
'
SUB UserColor STATIC
IF ZHiLiteOff THEN _
EXIT SUB _ ' DD061303/COLR
ELSE _ ' DD061303/COLR
ZFG5$ = ZEscape$ + "[1;34;40m" : _ 'Brt Blue ' DD061303/COLR
ZFG6$ = ZEscape$ + "[1;35;40m" : _ 'Brt Magenta ' DD061303/COLR
ZFG7$ = ZEscape$ + "[1;33;44m" : _ 'Yellow/Blue ' DD061303/COLR
ZFG8$ = ZEscape$ + "[1;33;42m" : _ 'Yellow/Green ' DD061303/COLR
ZFG9$ = ZEscape$ + "[1;33;41m" : _ 'Yellow/Red ' DD061303/COLR
ZFGA$ = ZEscape$ + "[1;33;45m" : _ 'Yellow/Magenta ' DD061303/COLR
ZFGB$ = ZEscape$ + "[1;37;44m" : _ 'White/Blue ' DD061303/COLR
ZFGC$ = ZEscape$ + "[1;37;42m" : _ 'White/Green ' DD061303/COLR
ZFGD$ = ZEscape$ + "[1;37;41m" : _ 'White/Red ' DD061303/COLR
ZFGE$ = ZEscape$ + "[1;37;45m" : _ 'White/Magenta ' DD061303/COLR
ZFGF$ = ZEscape$ + "[1;36;44m" 'Brt Cyan/Blue ' DD061303/COLR
59970 CALL QuickTPut (ZEmphasizeOff$,0)
ZOutTxt$ = "Make text R)ed,G)reen,Y)ellow,B)lue,P)urple,C)yan,W)hite" + ZPressEnterExpert$
GOSUB 59973
IF ZWasQ = 0 THEN _
ZEmphasizeOff$ = ZEscape$ + "[" + ZBoldText$ + _
";40;" + MID$(STR$(ZUserTextColor),2) + "m" : _
EXIT SUB
CALL AllCaps (ZUserIn$)
WasX = INSTR("RGYBPCW",ZUserIn$)
IF WasX = 0 THEN _
GOTO 59970
ZUserTextColor = 30 + WasX
ZOutTxt$ = "Make text Bright? (Y,[N])" ' DD060101
GOSUB 59973
ZBoldText$ = CHR$(48 - ZYes)
ZEmphasizeOff$ = ZEscape$ + "[" + ZBoldText$ + ";40;" + MID$(STR$(ZUserTextColor),2) + "m"
GOTO 59970
59973 ZSubParm = 1
ZTurboKey = -ZTurboKeyUser
CALL TGet
IF ZSubParm = -1 THEN _
EXIT SUB
RETURN
END SUB
59980 ' $SUBTITLE: 'SetGraphic - Sets user graphic preference'
' $PAGE
'
' NAME -- SetGraphic
'
' INPUTS -- PARAMETER MEANING
' GraphicsNumber 0=None, 1=Ascii, 2=color
'
' OUTPUTS -- ZWasGR Shared var - set to
' graphics.number
' ZUserGraphicDefault$ What add to file name to ' KG022003
' see if got graphics file ver
'
' PURPOSE -- Sets file graphics preference
'
SUB SetGraphic (GraphicsNumber) STATIC ' KG022003
ZWasGR = GraphicsNumber
IF ZWasGR = 2 THEN _
ZDR1$ = ZFG1Def$ : _
ZDR2$ = ZFG2Def$ : _
ZDR3$ = ZFG3Def$ : _
ZDR4$ = ZFG4Def$ : _ ' DD061303/COLR
ZDR5$ = ZFG5$ : _ ' DD061303/COLR
ZDR6$ = ZFG6$ : _ ' DD061303/COLR
ZDR7$ = ZFG7$ : _ ' DD061303/COLR
ZDR8$ = ZFG8$ : _ ' DD061303/COLR
ZDR9$ = ZFG9$ : _ ' DD061303/COLR
ZDRA$ = ZFGA$ : _ ' DD061303/COLR
ZDRB$ = ZFGB$ : _ ' DD061303/COLR
ZDRC$ = ZFGC$ : _ ' DD061303/COLR
ZDRD$ = ZFGD$ : _ ' DD061303/COLR
ZDRE$ = ZFGE$ : _ ' DD061303/COLR
ZDRF$ = ZFGF$ _ ' DD061303/COLR
ELSE ZDR1$ = "" : _
ZDR2$ = "" : _
ZDR3$ = "" : _
ZDR4$ = "" : _ ' DD061303/COLR
ZDR5$ = "" : _ ' DD061303/COLR
ZDR6$ = "" : _ ' DD061303/COLR
ZDR7$ = "" : _ ' DD061303/COLR
ZDR8$ = "" : _ ' DD061303/COLR
ZDR9$ = "" : _ ' DD061303/COLR
ZDRA$ = "" : _ ' DD061303/COLR
ZDRB$ = "" : _ ' DD061303/COLR
ZDRC$ = "" : _ ' DD061303/COLR
ZDRD$ = "" : _ ' DD061303/COLR
ZDRE$ = "" : _ ' DD061303/COLR
ZDRF$ = "" ' DD061303/COLR
ZUserGraphicDefault$ = MID$(" GC",ZWasGR+1, - (ZWasGR > 0)) ' KG022003
END SUB